package com.flashcash.solu.view.certification.status;

import android.support.annotation.StringRes;

import com.flashcash.solu.R;

/**
 * @作者:XLEO
 * @创建日期: 2017/10/26 14:12
 * @描述:${TODO}
 * @更新者:${Author}$
 * @更新时间:${Date}$
 * @更新描述:${TODO}
 * @下一步：
 */

@Deprecated
public enum EducationStatus implements InfoValueType {
    DIPLOMA_I("DIPLOMA_I", R.string.enum_education_DIPLOMA_I),
    DIPLOMA_II("DIPLOMA_II", R.string.enum_education_DIPLOMA_II),
    DIPLOMA_III("DIPLOMA_III", R.string.enum_education_DIPLOMA_III),
    SD("SD", R.string.enum_education_SD),
    SLTP("SLTP", R.string.enum_education_sltp),
    SLTA("SLTA", R.string.enum_education_slta),
    S1("S1", R.string.enum_education_S1),
    S2("S2", R.string.enum_education_S2),
    S3("S3", R.string.enum_education_S3);

    private final String mValue;
    private final int showString;

    EducationStatus(String value, int stringId) {
        this.mValue = value;
        this.showString = stringId;
    }

    @Override
    public String getValue() {
        return mValue;
    }

    @Override
    public int getShowString() {
        return showString;
    }

    @StringRes
    public static int findShowString(String value) {
        for (EducationStatus educationStatus : EducationStatus.values()) {
            if (educationStatus.getValue().equals(value)) {
                return educationStatus.getShowString();
            }
        }

        return -1;
    }
}
